package com.ruoyi.youtian.mapper;


import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.youtian.domain.FaultRecordDetail;
import com.ruoyi.youtian.domain.vo.ReportDetailsVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 故障记录Mapper接口
 *
 * @author ruoyi
 * @date 2022-09-08
 */
@Mapper
public interface FaultRecordDetailMapper
{
    /**
     * 查询故障记录
     *
     * @param faultRecordDetailId 故障记录主键
     * @return 故障记录
     */
    public FaultRecordDetail selectFaultRecordDetailByFaultRecordDetailId(Long faultRecordDetailId);

    /**
     * 查询故障记录列表
     *
     * @param faultRecordDetail 故障记录
     * @return 故障记录集合
     */
    @DataScope(deptAlias = "d")
    public List<FaultRecordDetail> selectFaultRecordDetailList(FaultRecordDetail faultRecordDetail);

    /**
     * 新增故障记录
     *
     * @param faultRecordDetail 故障记录
     * @return 结果
     */
    public int insertFaultRecordDetail(FaultRecordDetail faultRecordDetail);

    /**
     * 修改故障记录
     *
     * @param faultRecordDetail 故障记录
     * @return 结果
     */
    public int updateFaultRecordDetail(FaultRecordDetail faultRecordDetail);

    /**
     * 删除故障记录
     *
     * @param faultRecordDetailId 故障记录主键
     * @return 结果
     */
    public int deleteFaultRecordDetailByFaultRecordDetailId(Long faultRecordDetailId);

    /**
     * 批量删除故障记录
     *
     * @param faultRecordDetailIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFaultRecordDetailByFaultRecordDetailIds(Long[] faultRecordDetailIds);

    List<ReportDetailsVo> selectReportDetailslists(Long recordId);
}
